# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flask-rich
_pkgname=flask_rich
pkgver=0.4.1
pkgrel=1
pkgdesc='Rich implementation for Flask.'
arch=('any')
url='https://github.com/zyf722/Flask-Rich'
license=('MIT')
depends=('python' 'python-flask' 'python-rich' 'python-stransi')
makedepends=('python-build' 'python-pip' 'python-poetry')
options=(!emptydirs)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('00b5551365eb6de26d9a0132b6096a18d3e2f56c217c40658647804927c23d737d79cb847b7a63b5f5d336e9722e184907198d6c06ea96a41bccc2642f3860d2')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

